package com.education.welco.service.impl;

import java.util.List;

import com.education.common.utils.Convert;
import com.education.welco.mapper.SCatalogAnsweringSynMapper;
import com.education.welco.pojo.SCatalogAnsweringSyn;
import com.education.welco.service.ISCatalogAnsweringSynService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 备课查看课程问答 服务层实现
 *
 * @author d
 * @date 2020-05-14
 */
@Service
public class SCatalogAnsweringSynServiceImpl implements ISCatalogAnsweringSynService {

    @Autowired
    private SCatalogAnsweringSynMapper sCatalogAnsweringSynMapper;

    /**
     * 查询备课查看课程问答信息
     *
     * @param id 备课查看课程问答ID
     * @return 备课查看课程问答信息
     */
    @Override
    public SCatalogAnsweringSyn selectSCatalogAnsweringSynById(Integer id) {
        return sCatalogAnsweringSynMapper.selectSCatalogAnsweringSynById(id);
    }

    /**
     * 查询备课查看课程问答列表
     *
     * @param sCatalogAnsweringSyn 备课查看课程问答信息
     * @return 备课查看课程问答集合
     */
    @Override
    public List<SCatalogAnsweringSyn> selectSCatalogAnsweringSynList(SCatalogAnsweringSyn sCatalogAnsweringSyn) {
        return sCatalogAnsweringSynMapper.selectSCatalogAnsweringSynList(sCatalogAnsweringSyn);
    }

    /**
     * 新增备课查看课程问答
     *
     * @param sCatalogAnsweringSyn 备课查看课程问答信息
     * @return 结果
     */
    @Override
    public int insertSCatalogAnsweringSyn(SCatalogAnsweringSyn sCatalogAnsweringSyn) {
        return sCatalogAnsweringSynMapper.insertSCatalogAnsweringSyn(sCatalogAnsweringSyn);
    }

    /**
     * 删除备课查看课程问答
     *
     * @param catalogId 备课查看课程问答ID
     * @return 结果
     */
    @Override
    public int deleteSCatalogAnsweringSynByCatalogId(Integer catalogId) {
        return sCatalogAnsweringSynMapper.deleteSCatalogAnsweringSynByCatalogId(catalogId);
    }

    /**
     * 修改备课查看课程问答
     *
     * @param sCatalogAnsweringSyn 备课查看课程问答信息
     * @return 结果
     */
    @Override
    public int updateSCatalogAnsweringSyn(SCatalogAnsweringSyn sCatalogAnsweringSyn) {
        return sCatalogAnsweringSynMapper.updateSCatalogAnsweringSyn(sCatalogAnsweringSyn);
    }

    /**
     * 删除备课查看课程问答对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSCatalogAnsweringSynByIds(String ids) {
        return sCatalogAnsweringSynMapper.deleteSCatalogAnsweringSynByIds(Convert.toStrArray(ids));
    }
}